package com.hopu.v1.pojo.question;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hopu.v1.pojo.classes.Student;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 题目表
 * @TableName t_questions
 */
@TableName(value ="t_questions")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@EqualsAndHashCode
public class Questions implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 题库id
     */
    private String questionBanksId;

    /**
     * 题目
     */
    private String questionTitle;

    /**
     * 答案解析
     */
    private String analysis;

    /**
     * 题目类型
     */
    private String questionType;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 员工id 如果员工创建就给员工id
     */
    private Integer staffId;

    /**
     * 学生id 如果学生创建就给学生id
     */
    private Integer studentId;

    /**
     * 题目审核状态 0未审批 1审批通过 2审批驳回
     */
    private Integer status;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    
    /**
     * 选项
     */
    @TableField(exist = false)
    private List<QuestionsOptions> options;

    @TableField(exist = false)
    private String staffName;

    @TableField(exist = false)
    private String studentName;


    @TableField(exist = false)
    private List<Student> students;

    @TableField(exist = false)
    private List<QuestionsComments> questionsComments;

}
